import LogService from "../service/LogService";

export default class StorageUtils {

  static save(key, value){
    try {
      uni.setStorageSync(key, value)
    } catch (e) {
      LogService.error(e)
    }
  }

  static get(key){
    try {
      return uni.getStorageSync(key);
    } catch (e) {
      LogService.error(e)
    }
  }

  static remove(key){
    try {
      return uni.removeStorageSync(key);
    } catch (e) {
      LogService.error(e)
    }
  }

  static clear(){
    try {
      return uni.clearStorageSync();
    } catch (e) {
      LogService.error(e)
    }
  }
}
